/**
 * @Question JavaTest
 * @Date 2023/3/16 16:33
 * @Solution
 */
public class JavaTest {
    public static void main(String[] args) {
        int loopUntil = Integer.parseInt("6");
        for (int i=0; i < loopUntil; i++) {
            System.out.print(" " + i);
            System.out.print(":");
            for (int j=loopUntil; j > 0; j--) {
                if (((i + j) % 3) == 0) {
                    System.out.print("*");
                }
                System.out.print(j);
            }
            System.out.println();
        }
    }
}